﻿using System.Text;
using LuckyShell.ShellOrders;
using LuckyShell.ShellValues;

namespace LuckyShell.Commands;

public class PrintCommand(List<ShellValue> values) : Command(values)
{
    public override object Run(ref VariateManager manager)
    {
        var builder = new StringBuilder();
        foreach (var value in Values)
            builder.Append(value.GetValue(ref manager));
        Console.WriteLine(builder.ToString());
        return new VoidValue();
    }
}